Coroutine
COMPUTER SOFTWARE COMPONENT
Co-routine; Coroutines; Cothread; Co-routines; Deterministic concurrency; Suspended computation; Yield statement; Comparison of programming languages (coroutines)
Coroutines are computer program components that generalize subroutines for non-preemptive multitasking, by allowing execution to be suspended and resumed. Coroutines are well-suited for implementing familiar program components such as cooperative tasks, exceptions, event loops, iterators, infinite lists and pipes.